package com.wbt.design.patterns.obverser.test02;

/**
 * @program: spring
 * @description:
 * @author: Wang·Baotong
 * @create: 2021-07-05 14:45
 */
public class OctalObserver extends Observer {
    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.add(this);
    }

    @Override
    public void response() {
        System.out.println( "Octal String: "
                + Integer.toBinaryString( subject.getState() ) );
    }

    @Override
    public void response(Subject subject) {
        System.out.println( "Octal String: "
                + Integer.toBinaryString( subject.getState() ) );
    }
}
